package com.iwhalecloud.bss.kite.cucc.dataservice.mapper.collection;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.iwhalecloud.bss.kite.cucc.client.dto.order.KiteGroupDetailLog;

import com.ztesoft.bss.base.extmapper.BaseMapper;

/**
 * @author lyx
 * @version V1.0
 * @Description: TODO
 * @date 2021年2月22日
 * @Package com.iwhalecloud.bss.kite.cucc.dataservice.mapper.collection
 */
public interface KiteGroupDetailLogMapper extends BaseMapper<KiteGroupDetailLog> {

    /**
     * 根据校验状态和数量查询
     *
     * @param checkStatus
     * @param num
     * @return
     */
    List<KiteGroupDetailLog> listKiteGroupDetailLog(@Param("importType") String importType,
        @Param("checkStatus") String checkStatus, @Param("num") Integer num);

    /**
     * 更新校验结果
     *
     * @param checkStatus
     * @param groupId
     * @param checkResult
     */
    void updateKiteGroupDetailLogCheckStatus(@Param("checkStatus") String checkStatus, @Param("detailId") Long detailId,
        @Param("checkResult") String checkResult);

    /**
     * 更新转单处理结果
     *
     * @param statusCd
     * @param groupId
     * @param detailId
     * @param dealDesc
     */
    void updateKiteGroupDetailLogStatus(@Param("statusCd") String statusCd, @Param("detailId") Long detailId,
        @Param("dealDesc") String dealDesc);

    List<Map<String, Object>> queryKiteGroupBatchLog(Map<String, Object> paramMap);

    List<KiteGroupDetailLog> queryKiteGroupDetailLog(Map<String, Object> paramMap);

    List<Map<String, Object>> listKiteGroupInfoForMap(@Param("importType") String importType,
        @Param("checkStatus") String checkStatus, @Param("num") Integer num);

    List<Map<String, Object>> queryKiteGroupDetailLogForList(@Param("batchId") String batchId);

    String queryKiteGroupDetailCount(@Param("batchId") String batchId, @Param("statusCd") String statusCd);
}
